<?php

    if(!defined('BASEPATH'))
        exit('No direct script access allowed');

    class mail_list extends MX_Controller
    {

        private $data;

        public function __construct()
        {

            parent::__construct();
            if(!$this->session->userdata('logged_in'))
            {
                redirect(base_url());
            }
            $this->load->config('pages');

        }

        function view_all()
        {

            $this->data['title']='Mail list';
            $this->data['page'] = 'Maillist';
            $this->data['all_mails']=$this->db->get('maillist')->result_array();
            $this->template->build('other/maillist', $this->data);

        }

    }

?>
